from decimal import Decimal  # 小数运算精确
from unicodedata import decimal

a = 3.1415139  # 浮点数存储不精确
print(a, type(a))
n1 = 1.1
n2 = 2.2
n3 = 2.1
print(n1 + n2)  # 计算有时不准确
print(n1 + n3)

print(Decimal('1.1') + Decimal('2.2'))
